Adding new dns entry in ubuntu

Category: Geeks r Us

Post 1 by The Roman Battle Mask (Making great use of my Employer's time.) on Wednesday, 16-Jan-2008 23:14:53

If someone could explain how to add a dns server entry in ubuntu i'd appreciate it. Currently when I use the network-admin tool the entry appears to stick for a half hour or so then goes away.

Post 2 by tspivey (Generic Zoner) on Wednesday, 16-Jan-2008 23:23:20

add a line like the following to /etc/resolv.conf:
nameserver a.b.c.d
where a.b.c.d is the ip of the nameserver you want to add.
If you're using dhcp, your dhcp client might overwrite the file every time it obtains a lease. I googled it and found this post that might help in the dhcp case:
http://ubuntuforums.org/archive/index.php/t-409110.html

Post 3 by The Roman Battle Mask (Making great use of my Employer's time.) on Thursday, 17-Jan-2008 8:07:01

Thanks, it was dhcp I was dealing with but that link you posted appears to have done the trick.